STEP 8: We'll use a special event to let us continually collect data with the micro:bit!

Code indented underneath an interval event runs continuously.

  • In GRAPHICS, go to and drag out Interval Event to the bottom of your code editor.
  • Delete the line that says ····sprite.turn_left(15).
  • Then, in SUBJECT, click on and drag out Temperature INSIDE your interval event.

To navigate the page using the TAB key, first press ESC to exit the code editor.

microbit = codesters.Microbit() microbit.show_string("hello") data = microbit.get_temp() microbit.show_number(data) data_list = [] time_list = [] my_display = codesters.ScatterPlot(time_list, data_list) time = 0
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)